home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / moon2.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  42 lines

  1. (Comp.sys.handhelds) 
  2. Item: 581 by gerson at parc.xerox.com 
  3. Author: [Dan Gerson] 
  4.   Subj: More accurate phase of the moon program 
  5.   Date: Thu Jul 12 1990 07:02  
  6.  
  7. Here is an improved program to calculate and display the phase of the moon.  It 
  8. uses the drawing routines provided by Craig Finseth's phase of the moon program 
  9. (with the modifications to FLIP as suggested by Preston Brown and Juri Munkki), 
  10. but has an adapted version of the very complicated phase calcuation in John 
  11. Walker's moontool application on the SUN.  The HP48SX results are exactly the 
  12. same as those obtained from Moontool, which appear to be extremely accurate, 
  13. unlike the previous moon phase program. 
  14.  
  15. To use it, you have to write out your current time difference from UTC in a 
  16. TMZN global variable somewhere; I have my system setup with TMZN stored in 
  17. { HOME } so it is available to other programs I use.  Otherwise, you can just 
  18. put it in the same directory as your put { JDAT }.  For example, the correct 
  19. value for California is currently 7.  [Note: I put TMZN in the MOON2 directory 
  20. on the disk.  No need to worry about it.  Just be sure to store your "time 
  21. zone" UTC offset into it; default is 7.  -jkh-] 
  22.  
  23. Then {MPHASE} displays the current phase of the moon graphically using Craig 
  24. Finseth's code, {MTIME} returns a string containing the number of days, hours, 
  25. and minutes from the last new moon along with the current percentage of the 
  26. moon which is illuminated, {MFRAC} returns the illuminated percentage to level 
  27. 2 and the percentage of the moon's age since the last new moon in level 1, and 
  28. finally, {JDAT} return the current civil julian date and fraction of the day 
  29. (UTC). 
  30.  
  31. ---------------- 
  32. (Comp.sys.handhelds) 
  33. Item: 598 by gerson at parc.xerox.com 
  34. Author: [Dan Gerson] 
  35.   Subj: Error in moon phase posting          [already fixed -jkh-] 
  36.   Date: Tue Jul 17 1990 07:02  
  37.  
  38. My previous posting had a bug which was sensitive to the phase of the moon. In 
  39. my zealous attempts to inline a function, I messed up at the end of 'MFRAC'; 
  40. where it says 360 /, it should read 360 MOD 360 /.  I'll post the completely 
  41. corrected entry later.  [Don't worry about it!!!  Already fixed. -jkh-] 
  42.